Apple IIgs Communications
By Andrew Roughan
Copyright (c) 1995 Apple Users' Group, Sydney
Republished from Applecations, a publication of the Apple Users' Group, Sydney, Australia.
With the progression of the 'information superhighway' and the recent significant drop in the price of modems, many people will be exposed to the wealth of information available 'online'. Unfortunately, because nothing is quite as simple as it seems, they will also be exposed to a large number of potential problems in obtaining this information. The solutions to these problems may not be immediately apparent and the resulting confusion and frustration experienced by a new user can often be enough to dampen their enthusiasm.
My experience with computer communications has often left me stumped. The most frustrating problem I have encountered is the loss of carrier for no apparent reason (usually during a file transfer). My aim with this article is to point out the weaknesses in the link between the user and the service which they access, and to cover solutions which have worked for me.
Carrier Loss
There are two main reasons why a carrier can be lost. Either, the modem's 'intelligence' determines that the connection is not reliable enough to continue, or the modem's buffer becomes full.
Unreliable connections can usually be related directly to the quality of the telephone line. Modems have been designed to operate on a voice quality line. The latest modems can determine the quality of the line and compensate for the presence of static noise. The presence of too much noise will cause the modem to 'give up'.
Most line noise related problems are rare and can usually be resolved by simply re-dialling. If the line used for the modem is also the line used by the rest of the members of your household, be sure to let them know when you are 'online'. If a handset is picked up, even momentarily, the modem will usually be unable to recover.
If the number you are calling is international, use the 0015 prefix instead of 0011. The Faxlink 0015 service provides a network of high quality lines.
Some early models of the Telecom Touchfone 200 are known to interfere with modems. The symptoms are a swift degradation in response from the host, followed by a long period where nothing seems to happen, followed by carrier loss. To avoid this problem, disconnect the handset from the line when using the modem.
If you have the "Call Waiting" option of Telecom's "Easy Call" service, be sure to disable it before using your modem. The tones used to signal an incoming call will interfere with the modem connection and will usually result in loss of carrier.
If your telephone line is consistently causing problems for your modem, try describing the problem to Telecom. They may be able to make your voice line more reliable. If this proves to be unsatisfactory, the costly alternative is to ask them to provide a data quality line.
Buffer Overflow
The high speed modems which are available today can cause problems when they are connected to computers which were not developed to handle them.
Today's high speed modems are able to transmit data at a maximum physical rate of 28800 bits per second (bps). If the modem has inbuilt compression capability (most modems have a theoretical compression ratio of four times) then the maximum logical rate can be as high as 115200 bps.
To take advantage of the capability of the modem, the computer has to give the modem enough data to work with. This means that the computer should be able to transmit 115200 bits of data per second to the modem.
The Apple IIgs is capable of transmitting data at a maximum rate of 57600 bps using the built-in serial port. Clearly the Apple IIgs is incapable of pushing a 28800 bps modem to its logical limit.
Let's look at the situation from the other side. Suppose the modem was receiving data at its theoretical maximum logical rate of 115200 bps. The Apple IIgs can only cope with 57600 of these bits per second! Where do the excess 57600 bits go? Initially they enter the modems buffer but when the buffer becomes full (a 32k buffer will fill in four seconds) then the modem takes abortive action and will terminate the connection.
This problem depends entirely on the type of data being transmitted. Data which has been compressed by an application (e.g. Shrinkit) is unlikely to be able to be compressed further by the modem, so the maximum rate of transfer will remain at 28800 bps. On the other hand, uncompressed data which is comprised of large amounts of repeating characters (e.g. sound or graphics files) could cause this problem to occur.
To help prevent the possibility of buffer overflow occurring, a signalling method called RTS/CTS flow control has become standard. Also known as hardware flow control, this signalling method is used by the computer and the modem to temporarily stop the other from sending data.
Todays modems require a high speed cable which has the necessary pin connections to support this signalling method. Communicating reliably at high speeds without a high speed cable is not possible. Spectrum, an Apple IIgs Desktop communications program, supports the following high speed cable wiring:
Motherboard problems
Unknown to many, some Apple IIgs motherboards have a hardware bug which interferes with the reliability of the serial port CTS signal. The problem can be demonstrated by using a modem and high speed cable to upload a large file with Spectrum v1.0's zmodem file transfer protocol. After the modem's buffer is filled, the unreliable CTS signal allows more data to be sent to the modem. The modem realises that the buffer has overflowed and responds by breaking the connection.
ProTERM v3.1 and the next release of Spectrum both have software drivers which combat this problem transparently.
Character Loss
The right cable should ensure that the Apple IIgs gets to 'see' all data which is received by the modem. Unfortunately, the software application communicating with the modem may miss incoming data if it is not 'looking' at the Apple IIgs hardware closely.
Problems may be caused by having too many system INITs installed. If your application seems to be losing characters then try removing all INITs and see if the problem goes away.
The application should ideally use interrupts to make sure that the hardware notifies the application of all data received. Spectrum uses interrupt driven routines and should have no problems with character loss.
What about the host?
I've been unlucky enough to come across a host which uses high speed modems but which does not support hardware flow control. If your system is perfect but the host system is not then problems will still occur. An ASCII terminal connection may work marvelously, but zmodem file transfers will fail miserably.
Zmodem file transfers with UNIX hosts which exhibit this problem can be achieved by specifying a command line parameter to force each packet to be acknowledged. This command:
sz -l 1024 *.shk
will use the zmodem protocol to send all files in the current directory ending with ".shk". The packet size will be limited to 1024 bytes and each packet will need to be acknowledged by the receiver before the next packet is sent.
Hopefully, I've managed to explain areas where Apple IIgs communications can break down. Once you understand how the software, computer, cable and modem connect to one another, problem solving becomes a lot easier!
Permission is hereby granted for non-profit user groups to republish this content. PLEASE CREDIT THE AUTHOR AND THE SOURCE: Applecations, publication of the Apple Users' Group, Sydney, Australia